package product.service.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RefreshScope // 动态配置
@RestController
@RequestMapping("/config")
public class NacosController {
    @Value("${nacos.test.num}")
    private String nacosName;
    @RequestMapping("/get")
    public String get() {
        return nacosName;
    }
}
